<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<hr>
<table border="1" cellspacing="0" width="80%">
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>联系电话</th>
        <th>用户状态</th>
        <th>操作</th>


    </tr>


    <c:forEach items="${userInfo}" var="user" varStatus="status">
        <tr align="center">
            <%--<td>${brand.id}</td>--%>
            <td>${user.id}</td>
            <td>${user.name}</td>
            <td>${user.phone}</td>

            <c:if test="${user.status eq '1'}">
                <td>启用</td>
            </c:if>
            <c:if test="${user.status ne '1'}">
                <td>禁用</td>
            </c:if>

                <c:if test="${user.status eq '1'}">
                    <td><a href="/user-sys/AdminServlet?id=${user.id}&status=${user.status}">禁用</a> </td>
                </c:if>
                <c:if test="${user.status ne '1'}">
                    <td><a href="/user-sys/AdminServlet?id=${user.id}&status=${user.status}">启用</a> </td>
                </c:if>

        </tr>

    </c:forEach>

</table>

<script>
    document.getElementById("add").onclick = function (){
        location.href = "/brand-demo/addBrand.jsp";
    }

</script>
</body>
</html>